#ifndef _TIMER_H_
#define _TIMER_H_

#if defined(_MSC_VER)  &&  _MSC_VER >= 1310
# pragma warning( disable: 4244 )     // data convertion warning
#endif 

#include "Common.h"

class Timer
{
private:
	bool started;
	bool ended;

	uint64_t begin;
	uint64_t interval;	

	bool getInterval(uint64_t &t);
public:
	Timer();

	static uint64_t cpuspeed;

	void start();
	uint64_t end();
	void reset();

	uint64_t getNanoseconds();
	uint64_t getMicroseconds();
	uint64_t getMilliseconds();
	uint64_t getSeconds();
	uint64_t getMinutes();
};

#endif